import { Observable } from 'rxjs';

export function request(url: string) {
  return new Observable((observer) => {
    setTimeout(() => {
      observer.next(url + ' respone');
      observer.complete();
    }, 1000);
  });
}

export function badRequest(url: string) {
    return new Observable((observer) => {
      setTimeout(() => {
        observer.error(url + ' 500 Server');
        observer.complete();
      }, 1000);
    });
  }
  